

$(function(){
	$('#news').on('click','.newedit',function(){
		alert('aaaaaa');
		var id = $(this).siblings('.c1').text();
		var title = $(this).siblings('.c2').text();
		var content = $(this).siblings('.c3').text();
		$.post("ajax/islogin.php",{
			eve: 12 //12为修改资讯
			,id: id
			,title: title
			,content: content
		},function(data){
			if(data == 1){
				alert('修改成功!');
			}else{
				alert('修改失败:'+data);
			}
		},"text")
		
	});
	$('#news').on('click','.newdel',function(){
		var id = $(this).siblings('.c1').text();

		$.post("ajax/islogin.php",{
			eve: 13 //13为删除资讯
			,id: id
		},function(data){
			if(data == 1){
				$('#news').load(location.href+" #news>*","");
			}else{
				alert('删除失败:'+data);
			}
			
		},"text")
		
	});
	$('#addnew').on('click','.newadd',function(){
		var title = $(this).siblings('.c2').text();
		var content = $(this).siblings('.c3').text();

		$.post("ajax/islogin.php",{
			eve: 14 //14为增加资讯
			,title: title
			,content: content
		},function(data){
			if(data == 1){
				$('#news').load(location.href+" #news>*","");
			}else{
				alert('增加失败:'+data);
			}
			
		},"text")
		
	});
	
});
